<template>
  <div class="transfer page" ref="webview">
    <van-nav-bar title="转账记录" class="bg_white" left-arrow @click-left="$router.go(-1)" />
    <div class="content">
      <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
        <div class="nodata" v-if="dataList.length===0" style="height:200px;">暂无数据</div>
        <van-list v-model="loading" :finished="finished" :finished-text="dataList.length>5?'没有更多了':''" @load="onLoad" :offset="50" :immediate-check="false" v-else>
          <template v-for="(item,index) in dataList">
            <div class="list" :key="index">
              <div class="info">
                <div class="name">佣金转注册积分</div>
                <div class="text">佣金转账金额:{{item.transfer_money}}</div>
                <div class="text">注册积分到账金额::{{item.real_money}}</div>
              </div>
              <div class="time">{{item.create_time}}</div>
            </div>
          </template>
        </van-list>
      </van-pull-refresh>
    </div>
  </div>
</template>
<script>
import mixins from '@/utils/mixins';
export default {
  name: 'myTransfer',
  data () {
    return {
      showPreview: false,
      page: 1,
      dataList: [],
      isLoading: false,
      apiType: 'user',
      paramsUrl: 'record',
      apiUrl: 'transfer'
    };
  },
  mixins: [mixins],
  computed: {
    queryType () {
      return this.$route.params.type;
    },
    isApp: {
      get () {
        return !!localStorage.getItem('isApp') || !!this.$route.query.isApp;
      }
    }
  },
  created () {
    this.getList('transfer', true);
  },
  methods: {

  }
};
</script>
<style lang="less" scoped>
.transfer {
  height: 100%;
  display: flex;
  flex-direction: column;
  .content {
    flex: 1;
    box-sizing: border-box;
    overflow: auto;
    margin-top: 20px;
    .list {
      padding: 30px 40px;
      display: flex;
      justify-content: space-between;
      background-color: #fff;
      border-bottom: 1px solid rgba(238, 238, 238, 0.8); /*no*/
      .info {
        .name {
          color: #000;
          font-size: 30px;
        }
        .text {
          font-size: 24px;
          padding-top: 10px;
          display: block;
          color: #959595;
        }
      }
      .time {
        text-align: right;
        font-size: 24px;
        color: #959595;
      }
    }
  }
}
</style>
